<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
    <title>集控界面</title>
    <link href="${pageContext.request.contextPath}/static/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="http://cache.amap.com/lbs/static/main1119.css"/>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/css/show1.css"/>
    <link href="${pageContext.request.contextPath}/static/css/font-awesome.css" rel="stylesheet" />
    <link href="${pageContext.request.contextPath}/static/iconfont/iconfont.css" rel="stylesheet" />
    <script src="${pageContext.request.contextPath}/static/iconfont/iconfont.js"></script>
    <script src="http://cache.amap.com/lbs/static/es5.min.js"></script>
    <script src="http://webapi.amap.com/maps?v=1.4.5&key=您申请的key值"></script>
    <script type="text/javascript" src="http://cache.amap.com/lbs/static/addToolbar.js"></script>
    <script src="${pageContext.request.contextPath}/static/js/jquery.min.js"></script>
    <script src="${pageContext.request.contextPath}/static/js/bootstrap.min.js"></script>
    <script src="${pageContext.request.contextPath}/static/js/time.js"></script>
</head>
<style>

</style>
<body>
<div class="top col-md-12">
    <div class="top-left col-md-4">
        <div class="logo">
            <img src="${pageContext.request.contextPath}/static/imgs/logo1.png">
        </div>
    </div>
    <div class="top-center col-md-4 ">
        <div class="time">
            <span>时间：</span><span id="clock"></span>
        </div>
    </div>
    <div class="top-right col-md-4 ">
        <div class="search">
            <form>
                <input type="text" class="form-control"  placeholder="搜索">
                <a href="powerStationDisplay.html" class="btn btn-primary"><i class="fa fa-search" ></i></a>
                <a href="${pageContext.request.contextPath}/userLogin?login_status=reload" title="返回主页" class="bhome"><span class="fa fa-home"></span></a>

            </form>
        </div>
    </div>
</div>
<div class="main col-md-12">
    <div id="container">
    </div>
    <div class="main-left">
        <div class="sun">
            <div class="weaIcon">
                <div class="img">
                    <img src="${pageContext.request.contextPath}/static/imgs/weather.png">
                </div>
            </div>
            <div class="weather">
                <div class="weaContent">
                    <div class="place"><span class="fa fa-map-marker"></span>&nbsp;<span class="location">襄阳</span></div>
                    <div class="weaData">15℃多云</div>
                </div>
            </div>
            <div class="upDown">
                <div class="udContent">
                    <div class="up">
                        日出时间：<span class="upTime">06:00</span>
                    </div>
                    <div class="down">
                        日落时间：<span class="downTime">19:00</span>
                    </div>
                </div>
            </div>
        </div>
        <div class="list">
            <div class="box box1">
                <div class="box-top">
                    <span>总发电量</span>
                </div>
                <div class="content">
                    <div class="conData"><span>${powerCenter.all_elec}</span></div>
                </div>
            </div>
            <div class="box box2">
                <div class="box-top">
                    <span>当月发电量</span>
                </div>
                <div class="content">
                    <div class="conData">${powerCenter.month_elec}</div>
                </div>
            </div>
            <div class="box box3">
                <div class="box-top">
                    <span>累计收益</span>
                </div>
                <div class="content">
                    <div class="conData">${powerCenter.all_elec}*${powerCenter.powerAvgElec}</div>
                </div>
            </div>
        </div>
    </div>

    <div class="main-right">
        <div class="sun"></div>
        <div class="list">
            <div class="box box1">
                <div class="box-top">
                    <span>装机容量</span>
                </div>
                <div class="content">
                    <div class="conData">${powerCenter.installCapacity}</div>
                </div>
            </div>
            <div class="box box2">
                <div class="box-top">
                    <span>电站总数</span>
                </div>
                <div class="content">
                    <div class="conData">${powerCenter.runing_num}</div>
                </div>
            </div>
            <div class="box box3">
                <div class="box-top">
                    <span>减少CO2排放量</span>
                </div>
                <div class="content">
                    <div class="conData">${powerCenter.co2}</div>
                </div>
            </div>
        </div>
    </div>

</div>
<script>
    var map = new AMap.Map('container', {
        center: [100.397428, 35.90923],
        layers: [new AMap.TileLayer.Satellite()],
        zoom: 4
    });
    map.clearMap();  // 清除地图覆盖物

    data=${re}

    //    alert(data.length);
    for (var i=0;i<data.length;i++){
        var id = 'marker'+i;
        id = new AMap.Marker({
            icon:'../imgs/black.png',
            position:data[i].place
        });
        id.setMap(map);
        id.setTitle(data[i].cityname);
        id.setLabel({
            offset: new AMap.Pixel(20, 20),
            content: data[i].cityname
        });
//        alert(data[i].place+ data[i].cityname)
    }
</script>

</body>
</html>